package pl.jtb.ctl.tabory.dao.data.vo;

import java.io.Serializable;
import java.util.Date;

public class VagonVO implements Serializable, Comparable<VagonVO> {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String internalId;
    private Date revOneFrom;
    private Date revOneUntil;
    private Date revTwoFrom;
    private Date revTwoUntil;
    private Double revisionDistance;
    private Double revisionCorrection;
    private Double distance;
    private Boolean active;

    public VagonVO() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getInternalId() {
        return this.internalId;
    }

    public void setInternalId(String internalId) {
        this.internalId = internalId;
    }

    public Date getRevOneFrom() {
        return this.revOneFrom;
    }

    public void setRevOneFrom(Date revOneFrom) {
        this.revOneFrom = revOneFrom;
    }

    public Date getRevOneUntil() {
        return this.revOneUntil;
    }

    public void setRevOneUntil(Date revOneUntil) {
        this.revOneUntil = revOneUntil;
    }

    public Date getRevTwoFrom() {
        return this.revTwoFrom;
    }

    public void setRevTwoFrom(Date revTwoFrom) {
        this.revTwoFrom = revTwoFrom;
    }

    public Date getRevTwoUntil() {
        return this.revTwoUntil;
    }

    public void setRevTwoUntil(Date revTwoUntil) {
        this.revTwoUntil = revTwoUntil;
    }

    public Double getRevisionDistance() {
        return this.revisionDistance;
    }

    public void setRevisionDistance(Double revisionDistance) {
        this.revisionDistance = revisionDistance;
    }

    public Double getRevisionCorrection() {
        return this.revisionCorrection;
    }

    public void setRevisionCorrection(Double revisionCorrection) {
        this.revisionCorrection = revisionCorrection;
    }

    public Boolean getActive() {
        return active;
    }

    public void setActive(Boolean active) {
        this.active = active;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    @Override
    public int compareTo(VagonVO o) {
        return this.getId().compareTo(o.getId());
    }

    @Override
    public boolean equals(Object o) {
        if (o instanceof VagonVO) {
            VagonVO vagon = (VagonVO) o;
            return this.getId().equals(vagon.getId());
        }
        return false;
    }

    @Override
    public int hashCode() {
        int prime = 31;
        return prime * internalId.hashCode();
    }

    @Override
    public String toString() {
        return "VagonVO [id=" + id + ", internalId=" + internalId + ", revOneFrom=" + revOneFrom + ", revOneUntil=" + revOneUntil + ", revTwoFrom=" + revTwoFrom + ", revTwoUntil=" + revTwoUntil + ", revisionDistance=" + revisionDistance
                + ", revisionCorrection=" + revisionCorrection + ", distance=" + distance + ", active=" + active + "]";
    }

}
